from pymysql import Connection

conn = Connection(host='linux.server', port=3306, user='root', password='Chenhao$123456')
cursor = conn.cursor()
conn.select_db('pymysql_test')
cursor.execute('insert into test_pymysql values(6, "第六行数据")')
cursor.execute('insert into test_pymysql values(7, "第七行数据")')
conn.commit()
conn.close()